package com.link2room.optimus.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by sss on 2016/9/1.
 */
@Entity
@Table(name = "marketing_campaigns_price", catalog = "")
@DynamicInsert
public class MarketingCampaignsPrice extends BaseEntity {
    public enum MarketingCampaignsPrice_{
        mcCode,memberLevel,poolCode,memberLevelName,poolName,pbChannel
    }
    /**
     * 活动代码
     */
    private String mcCode;
    /**
     * 发布渠道
     */
    private String pbChannel;
    /**
     * 等级
     */
    private String memberLevel;
    /**
     * 价格池代码
     */
    private String poolCode;
    /**
     * 等级名称
     */
    private String memberLevelName;
    /**
     * 价格池名称
     */
    private String poolName;

    @Basic
    @Column(name = "mc_code", nullable = false, length = 64)
    public String getMcCode() {
        return mcCode;
    }

    public void setMcCode(String mcCode) {
        this.mcCode = mcCode;
    }

    @Basic
    @Column(name = "member_level", nullable = false, length = 16)
    public String getMemberLevel() {
        return memberLevel;
    }

    public void setMemberLevel(String memberLevel) {
        this.memberLevel = memberLevel;
    }

    @Basic
    @Column(name = "pool_code", nullable = false, length = 32)
    public String getPoolCode() {
        return poolCode;
    }

    public void setPoolCode(String poolCode) {
        this.poolCode = poolCode;
    }

    @Basic
    @Column(name = "member_level_name", nullable = true, length = 32)
    public String getMemberLevelName() {
        return memberLevelName;
    }

    public void setMemberLevelName(String memberLevelName) {
        this.memberLevelName = memberLevelName;
    }

    @Basic
    @Column(name = "pool_name", nullable = false, length = 32)
    public String getPoolName() {
        return poolName;
    }

    public void setPoolName(String poolName) {
        this.poolName = poolName;
    }

    @Basic
    @Column(name = "pb_channel", nullable = false, length = 16)
    public String getPbChannel() {
        return pbChannel;
    }

    public void setPbChannel(String pbChannel) {
        this.pbChannel = pbChannel;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MarketingCampaignsPrice that = (MarketingCampaignsPrice) o;

        if (mcCode != null ? !mcCode.equals(that.mcCode) : that.mcCode != null) return false;
        if (memberLevel != null ? !memberLevel.equals(that.memberLevel) : that.memberLevel != null) return false;
        if (poolCode != null ? !poolCode.equals(that.poolCode) : that.poolCode != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = mcCode != null ? mcCode.hashCode() : 0;
        result = 31 * result + (memberLevel != null ? memberLevel.hashCode() : 0);
        result = 31 * result + (poolCode != null ? poolCode.hashCode() : 0);
        return result;
    }

}
